package com.huawei.aiservice.controller;

import com.huawei.aiservice.service.ScheduleService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/aiService/schedule")
public class ScheduleController {

    @Resource
    private ScheduleService scheduleService;

    @GetMapping("/sync/report")
    @Scheduled(fixedRate = 3000)
    public void syncReportStatus()
    {
        scheduleService.syncReportStatus();
    }
}
